﻿<Window x:Class="SDF.Test.SmartDocuments"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:s="http://sdf.codeplex.com/"
        Title="Smart documents sample" 
        Height="600" Width="700"
        WindowStartupLocation="CenterScreen">

    <Grid Margin="4">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto"/>
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>

        <Label>Select the file to view:</Label>
        <ComboBox Grid.Column="1"
                  ItemsSource="{Binding SampleDocuments}"
                  DisplayMemberPath="Key"
                  SelectedValuePath="Key"
                  SelectedValue="{Binding SelectedDocumentName}" />
        
        <TabControl Grid.ColumnSpan="2" Grid.Row="1" SelectedIndex="1">
            
            <!-- FLOW VIEW -->
            <TabItem Header="Flow View">
                <Grid Background="LightGray">

                    <s:SmartDocumentViewer Document="{Binding SelectedDocument}" Grid.Column="2" 
                                           BorderBrush="Black" 
                                           BorderThickness="1"
                                           Background="White"
                                           Padding="-1"
                                           Margin="4" />

                </Grid>
            </TabItem>

            
            <TabItem Header="Paged View">

                <Grid Background="LightGray">
                    <DocumentViewer Name="Smart"
                                    Margin="4"
                                    Grid.Column="2"
                                    Document="{Binding PaginatedDocument}">

                    </DocumentViewer>
                </Grid>

            </TabItem>
        </TabControl>
    </Grid>
</Window>
